<template>
    <div id="index">
        <el-container>
            <el-aside width="240px">
                <!-- 左侧导航 -->
                <NaVView/>
            </el-aside>
            <el-container>
                <el-header>
                    <!-- 面包屑 -->
                    <BreadcrumbView/>
                    <el-button type="primary" id="logout" @click="logout()">退出</el-button>
                </el-header>
                <el-main>
                    <!-- 定义路由出口 -->
                    <div style="height: 100%; background-color: white;">
                        <router-view/>
                    </div>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<script>
import NaVView from './NaVView.vue';
import BreadcrumbView  from './BreadcrumbView.vue';
export default{
    data (){
        return{

        }
    },
    components:{
        NaVView,
        BreadcrumbView
    },
    methods:{
        logout(){
            sessionStorage.clear();
            this.$router.push("/login")
        }
    }

}

</script>

<style>

.el-aside {
    text-align: center;
    line-height: 200px;
    background-color: #001529;
}

.el-aside > ul > li {
    color: #fff;
}
.el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    height: 100%;
}

.el-container {
    margin-bottom: 40px;
    height: 100%;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
    line-height: 260px;
}


#index {
    height: 100%;
}

#bre {
    padding-top: 22px;
    width: 400px;
    float: left;
}

#logout {
    float: right;
    margin-top: 10px;
    margin-right: 50px;

    
}


</style>